import tornado.ioloop
import tornado.web

class MainHandler(tornado.web.RequestHandler):
    def get(self):
        #主要逻辑
        self.write('Hello,World')

application=tornado.web.Application([
    (r'/',MainHandler)
])

if __name__ == '__main__':

    #端口号
    application.listen(8000)

    print('127.0.0.1:8000')
    tornado.ioloop.IOLoop.instance().start()